package com.liujun.spring4.demo.aop.aop.beforeadvice;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * 前置增强接口
 *
 * @author liujun
 * @version 0.0.1
 * @date 2018/09/21
 */
public class GreetingBeforeAdvice implements MethodBeforeAdvice {

  @Override
  public void before(Method method, Object[] args, Object target) throws Throwable {

    String name = String.valueOf(args[0]);
    System.out.println("How are you? Mr." + name);

  }
}
